/*
 * Created on October 05, 2012, 5:01 PM
 */
package sembr.entities;

/**
 *
 * @author adriano
 */
public class Field extends EntityBase
{
    private String fieldType;
    private String direction;
    private String component;
    private double[] initialPosition;
    private double[] finalPosition;

    /**
     * @return the initialPosition
     */
    public double[] getInitialPosition() 
    {
        return initialPosition;
    }

    /**
     * @param initialPosition the initialPosition to set
     */
    public void setInitialPosition(double[] initialPosition) 
    {
        this.initialPosition = initialPosition;
    }

    /**
     * @return the finalPosition
     */
    public double[] getFinalPosition() 
    {
        return finalPosition;
    }

    /**
     * @param finalPosition the finalPosition to set
     */
    public void setFinalPosition(double[] finalPosition) 
    {
        this.finalPosition = finalPosition;
    }

    /**
     * @return the fieldType
     */
    public String getFieldType() 
    {
        return fieldType;
    }

    /**
     * @param fieldType the fieldType to set
     */
    public void setFieldType(String fieldType) 
    {
        this.fieldType = fieldType;
    }

    /**
     * @return the direction
     */
    public String getDirection()
    {
        return direction;
    }

    /**
     * @param direction the direction to set
     */
    public void setDirection(String direction) 
    {
        this.direction = direction;
    }

    /**
     * @return the component
     */
    public String getComponent() 
    {
        if ("Elétrico".equals(fieldType))
        {
            component = "e" + direction;
        }
        else
        {
            component = "h" + direction;
        }
            
        return component;
    }
}
